package {{.Package}}

import (
    "go.mongodb.org/mongo-driver/mongo"
)

var _ {{.Type}}Model = (*custom{{.Type}}Model)(nil)

type (
    // {{.Type}}Model is an interface to be customized, add more methods here,
    // and implement the added methods in custom{{.Type}}Model.
    {{.Type}}Model interface {
        {{.lowerType}}Model
    }

    custom{{.Type}}Model struct {
        *default{{.Type}}Model
    }
)

// New{{.Type}}Model returns a model for the mongo.
func New{{.Type}}Model(table string, db *mongo.Database) {{.Type}}Model {
    conn := db.Collection(table)
    return &custom{{.Type}}Model{
        default{{.Type}}Model: newDefault{{.Type}}Model(conn),
    }
}